//
//  TWUserAgreementViewController.swift
//  EyepetizerImitative
//
//  Created by 田伟 on 2017/3/27.
//  Copyright © 2017年 个人. All rights reserved.
//

import UIKit

class TWUserAgreementViewController: UIViewController {

    @IBOutlet weak var webView: UIWebView!
    @IBAction func didmissButtonClick() {
        dismiss(animated: true, completion: nil)
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        loadData()
    }

    private func loadData(){
        let baseURL = URL(fileURLWithPath: Bundle.main.bundlePath)
        let htmlPath = Bundle.main.path(forResource: "service_terms_chs.html", ofType: nil)
        let htmlContent = try? NSString(contentsOfFile: htmlPath!, encoding: String.Encoding.utf8.rawValue)
        webView.loadHTMLString(htmlContent! as String, baseURL: baseURL)
    }
}
